package com.yunduansing.demo.model.common;

import java.io.Serializable;
import java.util.List;

import lombok.Data;

@Data
public class PageResultModel<T> implements Serializable{
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private long total;
    private List<T> records;

    public PageResultModel(){}

    public PageResultModel(long total,List<T> records){
        this.total=total;
        this.records=records;
    }

    public static <T> PageResultModel page(long total,List<T> records){
        return new PageResultModel(total,records);
    }
}